﻿using System.ComponentModel.DataAnnotations;

namespace Yelper.Web.Validators {

    public class UrlAttribute : RegularExpressionAttribute {

        public UrlAttribute()
            : base(
                @"^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&amp;%\$#\=~])*[^\.\,\)\(\s]$"
                ) {
        }

    }
}